package com.aabbc.config.client.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * ConfigClientController
 *
 * @author: <a href="mailto:chenfenghai@oristartech.com">chenfenghai</a>
 * @version: 1.0
 * @date: 2019-11-04 16:32
 */
@RestController
@RefreshScope
public class ConfigClientController {

    @Value("${abc.a.b}")
    private String abc;

    @GetMapping("/abc")
    public String getAbc(){
        return "配置项为：abc.a.b，值为：".concat(abc);
    }
}
